import java.util.HashSet;
import java.util.Set;

public class Test {
    public static void main(String[] args){
        Set<String> run = new HashSet<>();
        Set<String> rope = new HashSet<>();
        Set<String> two = new HashSet<>();

        run.add("meimei");
        run.add("lili");
        run.add("kiki");
        run.add("titi");

        rope.add("kiki");
        rope.add("jiji");
        rope.add("titi");
        rope.add("koko");

        two.addAll(run);
        two.addAll(rope);
        System.out.print("鍙傚姞鎵€鏈夎繍鍔ㄩ」鐩殑鍚屽锛?\n"+two);

        two.clear();
        two.addAll(run);
        two.retainAll(rope);
        System.out.println("\n鍙傚姞浜嗕袱椤圭殑鍚屽: \n"+two);

        rope.removeAll(run);
        System.out.println("\n鍙弬鍔犺烦缁虫病鍙傚姞璺戞鐨勫悓瀛? \n"+rope);
    }
}

